﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace CabinetGrid.DeviceDriver.Apis
{
    [Route( "openapi/[controller]" )]
    [ApiController]
    public class SampleController : ControllerBase
    {
        private readonly ILogger _logger;
        private readonly ViewModel _viewModel;

        public SampleController( ILoggerFactory loggerFactory, ViewModel viewModel )
        {
            _logger = loggerFactory.CreateLogger( nameof( SampleController ) );
            _viewModel = viewModel;
        }

        [HttpPost]
        [Route( "Hello" )]
        public async Task<IActionResult> Hello( )
        {
            var dict = new Dictionary<string, object>
            {
                ["value"] = "hello-world"
            };

            await Task.CompletedTask;
            return Ok( dict );
        }
    }
}
